package com.pn.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Date;

@Component
public class User implements Serializable {
    private Integer uid;

    private String phone;

    private String pwd;

    private Integer gender;

    private String nick;

    private String trname;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date firstIn;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date lastIn;

    private Integer utype;

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone == null ? null : phone.trim();
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd == null ? null : pwd.trim();
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getNick() {
        return nick;
    }

    public void setNick(String nick) {
        this.nick = nick == null ? null : nick.trim();
    }

    public String getTrname() {
        return trname;
    }

    public void setTrname(String trname) {
        this.trname = trname == null ? null : trname.trim();
    }

    public Date getFirstIn() {
        return firstIn;
    }

    public void setFirstIn(Date firstIn) {
        this.firstIn = firstIn;
    }

    public Date getLastIn() {
        return lastIn;
    }

    public void setLastIn(Date lastIn) {
        this.lastIn = lastIn;
    }

    public Integer getUtype() {
        return utype;
    }

    public void setUtype(Integer utype) {
        this.utype = utype;
    }

    @Override
    public String toString() {
        return "User{" +
                       "uid=" + uid +
                       ", phone='" + phone + '\'' +
                       ", pwd='" + pwd + '\'' +
                       ", gender=" + gender +
                       ", nick='" + nick + '\'' +
                       ", trname='" + trname + '\'' +
                       ", firstIn=" + firstIn +
                       ", lastIn=" + lastIn +
                       ", utype=" + utype +
                       '}';
    }
}